<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<script type="text/javascript">
	this.imagePreview = function(){	
	xOffset = 10;
	yOffset = 30;
	$("a.preview").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("body").append("<p id='preview'><img src='"+ this.href +"' alt='Image preview' width='200' height='150' />"+ c +"</p>");			
		$("#preview").css("top",(e.pageY - xOffset) + "px").css("left",(e.pageX + yOffset) + "px").fadeIn("fast");						
    	},
	function(){
		this.title = this.t;	
		$("#preview").remove();
    	});	
	$("a.preview").mousemove(function(e){
		$("#preview").css("top",(e.pageY - xOffset) + "px").css("left",(e.pageX + yOffset) + "px");
	});			
};
$(document).ready(function(){
	imagePreview();
});
</script>
<style>
#preview{
	position:absolute;
	border:1px solid #ccc;
	background:#333;
	padding:5px;
	display:none;
	color:#fff;
	}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Second Stage PCR - (D)</title>

</head>
<body>

<table width = "100%" bgcolor="E1EBED">
	<tr>
		<td width="70%">
			Second Stage PCR - (D)
		</td>
		<td width="10%">
		 	<s:form action="SecondPCRHistory">
				<s:hidden value="%{geneName}" name="geneName" />
				<s:hidden value="%{stepType}" name="stepType" />
				<s:submit value="history"/>
			</s:form>
		</td>
		<td width="10">
			<s:form action="emergencyReport" id="emergencyReportSecondPCRD">
			<s:hidden value="%{geneName}" name="geneName" />
			<s:hidden value="Second Stage PCR - (D)" name="formName"/>
			<input type="button" value="report" onclick="reportEmergencySecondPCRD()"/>
			</s:form>
		</td>
	</tr>
</table>

<center>
Gene name:<s:property value="geneName"/>
</center>

<center>
<s:form action="updateGeneSecondPCR" id="secondPCRD">
<table>
	<tr><td><s:textfield name="recordDate" label = "Date"/></td></tr>
	<s:if test='volume1 == 0'><tr><td><s:textfield name="volume1" label="volume 001/026" value=""/></td></tr></s:if>
	<s:else><tr><td><s:textfield name="volume1" label="volume 001/026" /></td></tr></s:else>
	<s:if test='ml1 == 0'><tr><td><s:textfield name="ml1" label="[ng/ul] 001/026" value=""/></td></tr></s:if>
	<s:else><tr><td><s:textfield name="ml1" label="[ng/ul] 001/026" /></td></tr></s:else>
	<s:if test='volume2 == 0'><tr><td><s:textfield name="volume2" label="volume 002/027" value=""/></td></tr></s:if>
	<s:else><tr><td><s:textfield name="volume2" label="volume 002/027" /></td></tr></s:else>
	<s:if test='ml2 == 0'><tr><td><s:textfield name="ml2" label="[ng/ul] 002/027" value=""/></td></tr></s:if>
	<s:else><tr><td><s:textfield name="ml2" label="[ng/ul] 002/027" /></td></tr></s:else>
	<tr><td><s:textarea name="comments" cols="30" rows="5" label="Comments"></s:textarea></td></tr>
</table>
<s:hidden value="%{geneName}" name="geneName" />
<s:hidden value="%{stepType}" name="stepType" />
<table>
<tr><td><input type="button" value="update" onclick="updateSecondPCRD()"/></td></tr>
</table>
</s:form>
</center>
<center>
	<p></p> 
	<table width="50%">
		<tr bgcolor="#DBF3FF">
		<td>Date Uploaded</td>
		<td>Uploader</td>
		<td>File Name</td>
		<td>Option</td>
		</tr> 
		<s:iterator value="imageList">
        <tr bgcolor="#E1EBED">
        	<td width="28%"><s:date name="dateModified" format="MM/dd/yyyy hh:mm:ss a"/></td>
        	<td width="15%"><s:property value = "user.userName"/></td>
        	<td><a href="<s:url action = "ViewImage"><s:param name = "id"><s:property value="id"/></s:param></s:url>"><s:property value= "fileName"/></a></td>
        	<td><a href="upload/<s:property value="fileName"/>" class="preview">Preview</a>
        </tr>
        </s:iterator>       
   </table>   
<br>
</center>
</body>
</html>